use proc_macro::TokenStream;


mod periph;


#[proc_macro_derive(GpioConfig, attributes(gpio))]
pub fn derive_gpio(input: TokenStream) -> TokenStream {
    periph::gpio::build(input)
}

#[proc_macro_derive(DmaConfig, attributes(dma))]
pub fn derive_dma(input: TokenStream) -> TokenStream {
    periph::dma::build(input)
}

#[proc_macro_derive(UartConfig, attributes(uart))]
pub fn derive_uart(input: TokenStream) -> TokenStream {
    periph::uart::build(input)
}

#[proc_macro_derive(AdcConfig, attributes(adc))]
pub fn derive_adc(input: TokenStream) -> TokenStream {
    periph::adc::build(input)
}



